﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using Microsoft.Forums.MicrosoftForumsProvider;
using Microsoft.Forums.SyncService;
using Microsoft.Forums.OfflineStore;

namespace Microsoft.Forums.ForumsClient.Models
{
    /// <summary>
    /// Class to make binding Locale data easier than with key-value pair returned by GetSupportedLocales API
    /// </summary>
    public class Locale
    {
        private string localeName;
        private int localeIndex;

        /// <summary>
        /// Constructor sets members to default data
        /// </summary>
        public Locale()
        {
            LocaleName = String.Empty;
            LocaleIndex = -1;
        }

        /// <summary>
        /// Gets locale's name string
        /// </summary>
        public string LocaleName
        {
            get { return localeName; }
            set { localeName = value; }
        }

        /// <summary>
        /// gets locale index
        /// </summary>
        public int LocaleIndex
        {
            get { return localeIndex; }
            set { localeIndex = value; }
        }

        /// <summary>
        /// Override object.ToString to return locale's name rather than object's type
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            return LocaleName;
        }
    }

}
